package com.yanqu.road.entity.systemgroup.rank;

import java.util.Comparator;

public class UserRankSort  implements Comparator<UserRank> {

    @Override
    public int compare(UserRank o1, UserRank o2) {
        int ret = o2.getValue().compareTo(o1.getValue());
        if(ret != 0){
            return ret;
        }
        if (!o2.getParam().equals(o1.getParam())) {
            return Long.compare(Long.parseLong(o2.getParam()), Long.parseLong(o1.getParam()));
        }
        return Long.compare(o1.getLastUpdateTime(), o2.getLastUpdateTime());
    }
}
